<template>
	<u-popup v-model="show" mode="center" border-radius="28" bgColor="rgba(255,255,255,0)">
		<view class="prize">
			<image class="top_img"
				src="https://lvpaiqiche.oss-cn-hangzhou.aliyuncs.com/image/20230526/20230526165753_wyin.png"
				mode="widthFix"></image>
			<view class="content">
				{{ text }}
			</view>
			<view class="submit flex justify-center" @click="handGo">
				<button>前往领取</button>
			</view>
			<view class="close">
				<image src="/static/icon_img/delred.png" mode="" @click="handClose"></image>
			</view>
		</view>
	</u-popup>
</template>

<script>
	export default {
		data() {
			return {
				text: '',
				show: false
			}
		},
		methods: {
			handGo() {
				this.handClose()
				uni.navigateTo({
					url: '/pages/user/pack'
				})
			},
			showEdit(tip) {
				console.log(tip)
				this.text = tip
				this.show = true
			},
			handClose() {
				this.show = false
			}
		}
	}
</script>

<style lang="scss" scoped>
	.prize {
		position: relative;

		.top_img {
			width: 680rpx;
			height: auto;
		}

		.content {
			position: absolute;
			left: 150rpx;
			top: 370rpx;
			width: 370rpx;
			height: 230rpx;
			color: #fff;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			box-sizing: border-box;
			padding: 20rpx;
		}

		.submit {
			button {
				margin-top: 20rpx;
				width: 630rpx;
				background-color: #FCDB85;
				border-radius: 20rpx;

				&::after {
					border: none;
				}
			}
		}

		.close {
			margin-top: 50rpx;
			display: flex;
			justify-content: center;

			image {
				width: 50rpx;
				height: 50rpx;
			}
		}
	}
</style>